var mongoose = require("mongoose");
// 先创建Schema
var foodSchema = mongoose.Schema({
    name: String,
    price: Number,
    // food type
    type: String,
    image: String,
    comments: [{
        customerName: String, content: String,
        star: Number
    }],
    merchant: {
        type: mongoose.Schema.Types.ObjectId,
        ref: 'Merchant'
    }
}, {
        collection: 'food'

    });
var Food = mongoose.model('Food',foodSchema);

exports = module.exports = Food;